home *** CD-ROM | disk | FTP | other *** search
- /*
- * Aes menu library interface
- *
- * menu_bar Show/Hide menu bar
- * menu_icheck Check/Uncheck a menu item
- * menu_ienable Enable/Disable a menu item
- * menu_tnormal Display a menu item in normal/rev video
- * menu_text Change the text of a menu item
- * menu_register Put desk accessory menu item in Desk menu
- *
- * ++jrb bammi@cadence.com
- * modified: mj -- ntomczak@vm.ucs.ualberta.ca
- */
- #include "common.h"
-
- #ifdef __DEF_ALL__
-
- #define L_menu_bar
- #define L_menu_ich
- #define L_menu_ien
- #define L_menu_tno
- #define L_menu_tex
- #define L_menu_reg
-
- #endif /* __DEF_ALL__ */
-
-
- #ifdef L_menu_bar
-
- /* Show/hide a menu bar
- * returns 0 on error >0 no error
- */
- int menu_bar(void *Tree, int ShowFlag)
- {
- _int_in[0] = ShowFlag;
- _addrin[0] = Tree;
-
- return __aes__(AES_CONTROL_ENCODE(30, 1, 1, 1));
- }
- #endif /* L_menu_bar */
-
-
- #ifdef L_menu_ich
-
- /* Check/Uncheck a menu item
- * returns 0 on error >0 no error
- */
- int menu_icheck(void *Tree, int Item, int CheckFlag)
- {
- _addrin[0] = Tree;
- _int_in[0] = Item;
- _int_in[1] = CheckFlag;
-
- return __aes__(AES_CONTROL_ENCODE(31, 2, 1, 1));
- }
- #endif /* L_menu_ich */
-
- #ifdef L_menu_ien
-
- /* Enable/Disable a menu item
- * returns 0 on error >0 no error
- */
- int menu_ienable(void *Tree, int Item, int EnableFlag)
- {
- _addrin[0] = Tree;
- _int_in[0] = Item;
- _int_in[1] = EnableFlag;
-
- return __aes__(AES_CONTROL_ENCODE(32, 2, 1, 1));
- }
- #endif /* L_menu_ien */
-
- #ifdef L_menu_tno
-
- /* Show menu item in Norm/Rev video
- * returns 0 on error >0 no error
- */
- int menu_tnormal(void *Tree, int Item, int NormalFlag)
- {
- _addrin[0] = Tree;
- _int_in[0] = Item;
- _int_in[1] = NormalFlag;
-
- return __aes__(AES_CONTROL_ENCODE(33, 2, 1, 1));
- }
- #endif /* L_menu_tno */
-
- #ifdef L_menu_tex
-
- /* Change the text of a menu item
- * returns 0 on error >0 no error
- */
- int menu_text(void *Tree, int Item, char *Text)
- {
- _addrin[0] = Tree;
- _addrin[1] = Text;
- _int_in[0] = Item;
-
- return __aes__(AES_CONTROL_ENCODE(34, 1, 1, 2));
- }
- #endif /* L_menu_tex */
-
- #ifdef L_menu_reg
-
- /* Register an accessory with the Desk Menu
- * returns menuid -1 == no more room in desk menu
- */
- int menu_register(int ApId, char *MenuText)
- {
- _int_in[0] = ApId;
- _addrin[0] = MenuText;
-
- return __aes__(AES_CONTROL_ENCODE(35, 1, 1, 1));
- }
- #endif /* L_menu_reg */
-
- /* - eof - */
-